﻿<!doctype html>
<html>
	<head>
		<title></title>
        <script type="text/javascript" src="../assets/js/jquery-1.5.1.min.js"></script>   
        <script type="text/javascript" src="../assets/js/jquery-ui-1.8.14.custom.min.js"></script>   
        
        <script src="../assets/js/vm/CommandInfo.js"></script>
        <script src="../assets/js/vm/StackEntry.js"></script>
        <script src="../assets/js/vm/EvaluationStack.js"></script>
        <script src="../assets/js/vm/LocalMemory.js"></script>
        <script src="../assets/js/vm/MethodState.js"></script>
        <script src="../assets/js/vm/commands.js"></script>
        <script src="../assets/js/vm/vm.js"></script>
        
        <script src="../assets/js/vm/jvsUnit.js"></script>
        
        <script src="./vm/arithmeticTests.js"></script>
        <script src="./vm/bitwiseOperationsTests.js"></script>
        <script src="./vm/branchingTests.js"></script>
        <script src="./vm/comparisonTests.js"></script>
        <script src="./vm/localMemoryTests.js"></script>
        <script src="./vm/miscTests.js"></script>

        <style>
            .testFixtureName
            {
                padding-top:20px;
                font-weight:bold;
            }
            
            .testResult
            {
            }
            
            .testName
            {
                width: 300px;
            }
            
            .testName:after
            {
                content: " :";
            }
            
            .success
            {
                color: Green;
            }
            
            .failure
            {
                color: Red;
            }
        </style>

	</head>
	<body>

            <script>


                PrintResults = function (testFixtureResult) {
                    document.write("<div class=\"testFixtureName\">" + testFixtureResult.fixtureName + "</div>");
                    for (var i = 0; i < testFixtureResult.results.length; i++) {

                        var testResult = testFixtureResult.results[i];

                        document.writeln("<div class=\"testResult\">");
                        document.writeln("<span class=\"testName\">" + testResult.testName + "</span>");

                        if (testResult.success)
                            document.writeln("<span class=\"success\">Success</span>");
                        else
                            document.writeln("<span class=\"failure\">Failure - " + testResult.errorMessage + "</span>");

                        document.writeln("</div>");
                    };
                };

                var tests = [new ArithmeticTests(), new BitwiseOperationsTests(), new BranchingTests(), new ComparisonTests(), new LocalMemoryTests(), new MiscTests()];
                
                for (var i = 0; i < tests.length; i++)
                {
                    var test = tests[i];
                    var testFixtureResult = test.Execute();
                    PrintResults(testFixtureResult);
                }                
        
        </script>

        <div id="templates" style="display:none; visibility:hidden">
        
            
        
        
        </div>


	</body>
</html>